#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100 + 5;
int n;
int a[MAXN];

int main() {
    scanf("%d", &n);
    for (int i = 1; i <= n; ++i) {
        scanf("%d", &a[i]);
    }

    for (int i = 1; i < n; ++i) {
        if (a[i + 1] <= a[i]) {
            puts("No");
            return 0;
        }
    }

    puts("Yes");
    return 0;
}